<template>
  <div class="live_video" @click="toDetil">
    <div class="live_item display-column">
      <img class="banner" :src="'https://ss.lanqb.com/' + livelist.banner" />
      <div class="live_user">
        <h2>{{ livelist.title }}</h2>
        <div class="tx">
          <img :src="'https://ss.lanqb.com/' + livelist.profile.avatar" />
          <span>{{ livelist.profile.nickname }}</span>
        </div>
        <span>时间：{{ livelist.begin_at }}</span>
        <span>{{ livelist.statistic.purchases }}人感兴趣</span>
      </div>
      <div class="button">
        <span>立即报名</span>
      </div>
      <em>第{{ livelist.periods }}期</em>
    </div>
  </div>
</template>
~

<script>
export default {
  name: "LiveVideo",
  props: ["livelist"],

  data() {
    return {
      page: 1,
    };
  },

  created() {
    
  },
  mounted() {
    
  },

  methods: {
    toDetil(){
     this.$router.push(`/daniuCourse/${this.livelist.id}`);
     this.$store.commit('setBar',false);
    }
  },
};
</script>

<style lang="scss" scoped>
.live_video {
  // height: 100vh;
  margin: 0 auto;
  margin-bottom: -70px;
  width: 90vw;
  .live_item {
    &:last-child {
      margin-bottom: 100px !important;
    }
    .button {
      position: absolute;
      right: 30px;
      bottom: 24px;
      width: 86px;
      height: 32px;
      font-size: 16px;
      text-align: center;
      line-height: 32px;
      border-radius: 25px;
      color: #634b19;
      background: #edce8c;
      background-image: linear-gradient(180deg, #f7e9c0, #edce8c);
    }
    margin: 20px 0;
    position: relative;
    width: 100%;
    background-color: white;
    border-radius: 5px;
    .banner {
      border-radius: 5px;
      width: 100%;
      height: 194px;
    }
    .live_user {
      @include flex-column;
      margin-top: 10px;
      margin-left: 10px;
      .tx {
        display: flex;
        img {
          width: 25px;
          height: 25px;
          border-radius: 50%;
          margin: 5px;
        }
        span {
          text-align: center;
          line-height: 25px;
          color: #333;
          font-weight: 700;
        }
      }
      h2 {
        font-size: 16px;
        font-weight: 700;
      }
      span {
        color: #8c8c8c;
        margin-top: 10px;
        font-size: 12px;
      }
    }
    em {
      position: absolute;
      left: 10px;
      top: 5px;
      z-index: 1;
      display: inline-block;
      color: #fff;
      background-color: rgba(0, 0, 0, 0.4);
      line-height: 13px;
      white-space: nowrap;
      font-size: 12px;
      padding:2px 5px;
      border-radius: 14px;
    }
  }
}
</style>
